ActiveRecord::Schema.define(version: 20120209231801) do

  create_table "assets", force: true do |t|
    t.string   "caption"
    t.string   "title"
    t.string   "asset_file_name"
    t.string   "asset_content_type"
    t.integer  "asset_file_size"
    t.integer  "created_by_id"
    t.integer  "updated_by_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "uuid"
    t.integer  "original_width"
    t.integer  "original_height"
    t.string   "original_extension"
  end

  create_table "config", force: true do |t|
    t.string "key",   limit: 40, default: "", null: false
    t.string "value",               default: ""
  end

  add_index "config", ["key"], name: "key", unique: true

  create_table "extension_meta", force: true do |t|
    t.string  "name"
    t.integer "schema_version", default: 0
    t.boolean "enabled",        default: true
  end

  create_table "layouts", force: true do |t|
    t.string   "name",          limit: 100
    t.text     "content"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "created_by_id"
    t.integer  "updated_by_id"
    t.string   "content_type",  limit: 40
    t.integer  "lock_version",                 default: 0
  end

  create_table "page_attachments", force: true do |t|
    t.integer "asset_id"
    t.integer "page_id"
    t.integer "position"
  end

  create_table "page_fields", force: true do |t|
    t.integer "page_id"
    t.string  "name"
    t.string  "content"
  end

  add_index "page_fields", ["page_id", "name", "content"], name: "index_page_fields_on_page_id_and_name_and_content"

  create_table "page_parts", force: true do |t|
    t.string  "name",      limit: 100
    t.string  "filter_id", limit: 25
    t.text    "content"
    t.integer "page_id"
  end

  add_index "page_parts", ["page_id", "name"], name: "parts_by_page"

  create_table "pages", force: true do |t|
    t.string   "title"
    t.string   "slug",                   limit: 100
    t.string   "breadcrumb",             limit: 160
    t.string   "class_name",             limit: 25
    t.integer  "status_id",                              default: 1,     null: false
    t.integer  "parent_id"
    t.integer  "layout_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.datetime "published_at"
    t.integer  "created_by_id"
    t.integer  "updated_by_id"
    t.boolean  "virtual",                                default: false, null: false
    t.integer  "lock_version",                           default: 0
    t.text     "allowed_children_cache", limit: 1500, default: ""
  end

  add_index "pages", ["class_name"], name: "altered_pages_class_name"
  add_index "pages", ["parent_id"], name: "altered_pages_parent_id"
  add_index "pages", ["slug", "parent_id"], name: "altered_pages_child_slug"
  add_index "pages", ["virtual", "status_id"], name: "altered_pages_published"

  create_table "sessions", force: true do |t|
    t.string   "session_id"
    t.text     "data"
    t.datetime "updated_at"
  end

  add_index "sessions", ["session_id"], name: "index_sessions_on_session_id"
  add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at"

  create_table "snippets", force: true do |t|
    t.string   "name",          limit: 100, default: "", null: false
    t.string   "filter_id",     limit: 25
    t.text     "content"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "created_by_id"
    t.integer  "updated_by_id"
    t.integer  "lock_version",                 default: 0
  end

  add_index "snippets", ["name"], name: "name", unique: true

  create_table "users", force: true do |t|
    t.string   "name",          limit: 100
    t.string   "email"
    t.string   "login",         limit: 40,  default: "",    null: false
    t.string   "password",      limit: 40
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "created_by_id"
    t.integer  "updated_by_id"
    t.boolean  "admin",                        default: false, null: false
    t.boolean  "designer",                     default: false, null: false
    t.text     "notes"
    t.integer  "lock_version",                 default: 0
    t.string   "salt"
    t.string   "session_token"
    t.string   "locale"
  end

  add_index "users", ["login"], name: "login", unique: true

end
